package com.dreamcar.auction.entity.eao;

import java.util.List;
import java.util.Set;

import javax.ejb.Local;

import com.dreamcar.auction.entity.Bid;
import com.dreamcar.auction.entity.CarModel;
import com.dreamcar.auction.entity.Component;
import com.dreamcar.auction.entity.DestinationMarket;
import com.dreamcar.auction.entity.PurchaseOrder;
import com.dreamcar.auction.entity.Request;
import com.dreamcar.auction.entity.Supplier;

@Local
public interface ReverseAuctionEAOLocal {
	
	//****Consultas para filtrar Componentes ***//
	public List<DestinationMarket> findAllDestinationMarket();
	
	public List<CarModel> findCarModelByDestinationMarket(Integer idDestinationMarket);
	
	public List<Component> findCarComponentByCarModel(Integer idCarModel, String discriminator);

	//*** Solo operaciones a BD ***//
	public void saveRequest(Request entity, Integer idComponente, String username);
	
	public Request updateRequest(Request entity);
	
	public Set<Bid> findBidsByRequest(Integer requestId);
	
	public List<Request> findRequestByExample(Request request);
	
	public Request getRequestReferenceById(Integer idRequest);
	
	public void saveBid(Bid bid, String username);
	
	public PurchaseOrder savePO(Integer requestId, Integer bidId);
	
	public Supplier findSupplierByUsername(String username);
	
	public Bid updateBid(Bid bid);
	
	public Component getComponentReferenceById(Integer componentId);
	
}
